from matplotlib import pyplot as plt

plt.rcParams['font.sans-serif']=['SimHei']
x=[1,2,3]
name=['A班','B班','C班']
y=[80,85,75]
plt.bar(x,y)
plt.title('三班成绩柱状图')
plt.xlabel('班级')
plt.ylabel('成绩')
plt.xticks(x,name)
for i in range(1,4):
    plt.text(i,y[i-1]+1,y[i-1])
plt.show()
